
<?php
echo $this->adminToolBar('excursion', 'edit', '/admin/excursion/add/', '/admin/excursion/updaterates/', '/admin/excursion/delete/', '/admin/excursion/');
?>


    <table border="1" width="100%" cellpadding="1" cellspacing="2">
	<form name="exform" id="exform" action="/admin/excursion/doedit/">
        <tr>
		<td width="15%">Excursion day desc</td>
		<td width="85%"><input type="text" name="daydesc" id="daydesc" value="<?php echo $this->excursion_arr['daydesc']; ?>" class="input-2" /></td>
	</tr>
        <tr>
		<td width="15%">Excursion day desc (ru)</td>
		<td width="85%"><input type="text" name="daydesc_ru" id="daydesc_ru" value="<?php echo $this->excursion_arr['daydesc_ru']; ?>" class="input-2" /></td>
	</tr>
        <tr>
		<td width="15%">Excursion city desc</td>
		<td width="85%"><?php echo $this->EditorFck('citydesc', $this->excursion_arr['citydesc']); ?></td>
	</tr>
        <tr>
		<td width="15%">Excursion city desc (ru)</td>
		<td width="85%"><?php echo $this->EditorFck('citydesc_ru', $this->excursion_arr['citydesc_ru']); ?></td>
	</tr>
         <tr>
		<td width="15%">Active</td>
		<td width="85%"><input <?php echo ($this->excursion_arr['active']==1)?"checked":"" ?> type="checkbox" name="active" id="active" value="<?php echo $this->excursion_arr['active']; ?>" class="input-2" /></td>
	</tr>
        </form>
    </table>
<script type="text/javascript">
function updateexcursion() 
{
       var daydesc=$('#daydesc');
       var daydesc_ru=$('#daydesc_ru');
       //var citydesc=$('#citydesc');
       var citydesc = FCKeditorAPI.GetInstance("citydesc").EditorWindow.parent.FCK.GetHTML();
       var citydesc_ru = FCKeditorAPI.GetInstance("citydesc_ru").EditorWindow.parent.FCK.GetHTML();
        if($('#active').attr('checked')==true)
            {
                active=1;

            }
            else{
                active=0;
            }
		$.ajax({
			type: "POST",
			url: '/admin/excursion/doedit/',
			data: ({daydesc:daydesc.val(),citydesc:citydesc, daydesc_ru:daydesc_ru.val(),citydesc_ru:citydesc_ru ,active:active,id:<?php echo $this->excursion_id;?>}),
	    	        success: function(data, textStatus, XMLHttpRequest){
	    	   	if(data != '') {
                               alert(data);
                             //  alert("successfully Added the   features");
	    			loadPage('/admin/excursion/');
	    	   	}
	    	},
	    	complete: function complete(XMLHttpRequest, textStatus){
	         //   $("#loader_area").hide();
	        }
		});

}



</script>


